package jianzhiOfferII;

import java.util.Arrays;

//剑指 Offer II 032. 有效的变位词
public class Num032_isAnagram {
    public boolean isAnagram(String s, String t) {
        if (s.length() != t.length() || s.equals(t))return false;

        char []s1 = s.toCharArray();
        char []t1 = t.toCharArray();
        Arrays.sort(s1);
        Arrays.sort(t1);
        return Arrays.equals(s1 , t1);



    }
}
